{"ast":null,"code":"import apiClient from \"../http\";\nimport { deleteContent, uploadImage, uploadFile } from \"../routes\";\nexport default class ContentService {\n  static async deleteContent(data) {\n    return apiClient.delete(deleteContent(data.id || '0'));\n  }\n  static async uploadImage(file) {\n    return apiClient.post(uploadImage(), file);\n  }\n  static async uploadFile(file) {\n    return apiClient.post(uploadFile(), file);\n  }\n}","map":{"version":3,"names":["apiClient","deleteContent","uploadImage","uploadFile","ContentService","data","delete","id","file","post"],"sources":["/data/messenger.client/src/services/ContentService.ts"],"sourcesContent":["import apiClient from \"../http\";\nimport {AxiosResponse} from 'axios';\nimport {deleteContent, uploadImage, uploadFile} from \"../routes\"\nimport {ContentListItem} from \"../models/response/ContentListItem\";\nimport {DeleteContentResponse} from \"../models/response/Other/DeleteContentResponse\";\n\nexport default class ContentService {\n\n    public static async deleteContent(data: ContentListItem): Promise<AxiosResponse<DeleteContentResponse>> {\n        return apiClient.delete<DeleteContentResponse>(deleteContent(data.id || '0'));\n    }\n\n    public static async uploadImage(file: FormData): Promise<AxiosResponse<ContentListItem>> {\n        return apiClient.post(uploadImage(), file);\n    }\n\n    public static async uploadFile(file: FormData): Promise<AxiosResponse<ContentListItem>> {\n        return apiClient.post(uploadFile(), file);\n    }\n}"],"mappings":"AAAA,OAAOA,SAAS,MAAM,SAAS;AAE/B,SAAQC,aAAa,EAAEC,WAAW,EAAEC,UAAU,QAAO,WAAW;AAIhE,eAAe,MAAMC,cAAc,CAAC;EAEhC,aAAoBH,aAAa,CAACI,IAAqB,EAAiD;IACpG,OAAOL,SAAS,CAACM,MAAM,CAAwBL,aAAa,CAACI,IAAI,CAACE,EAAE,IAAI,GAAG,CAAC,CAAC;EACjF;EAEA,aAAoBL,WAAW,CAACM,IAAc,EAA2C;IACrF,OAAOR,SAAS,CAACS,IAAI,CAACP,WAAW,EAAE,EAAEM,IAAI,CAAC;EAC9C;EAEA,aAAoBL,UAAU,CAACK,IAAc,EAA2C;IACpF,OAAOR,SAAS,CAACS,IAAI,CAACN,UAAU,EAAE,EAAEK,IAAI,CAAC;EAC7C;AACJ"},"metadata":{},"sourceType":"module"}